package com.ruoyi.app.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.app.domain.AppUserDonations;
import com.ruoyi.app.service.IAppUserDonationsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 我的捐献记录Controller
 * 杨梦甲
 * @author ruoyi
 * @date 2025-11-06
 */

@RestController
@RequestMapping("/app")
public class AppUserDonationsController extends BaseController
{
//    @Autowired
//    private IAppUserDonationsService appUserDonationsService;
//    /**
//     * 查询我的捐献记录列表
//     */
//    @GetMapping("/my_donations/list")
//    public TableDataInfo list(AppUserDonations appUserDonations)
//    {
//        startPage();
//        List<AppUserDonations> list = appUserDonationsService.selectAppUserDonationsList(appUserDonations);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出我的捐献记录列表
//     */
//    @Log(title = "我的捐献记录", businessType = BusinessType.EXPORT)
//    @PostMapping("/my_donations/export")
//    public void export(HttpServletResponse response, AppUserDonations appUserDonations)
//    {
//        List<AppUserDonations> list = appUserDonationsService.selectAppUserDonationsList(appUserDonations);
//        ExcelUtil<AppUserDonations> util = new ExcelUtil<AppUserDonations>(AppUserDonations.class);
//        util.exportExcel(response, list, "我的捐献记录数据");
//    }
//
//    /**
//     * 获取我的捐献记录详细信息
//     */
//    @GetMapping(value = "/my_donations/{mydonationsId}")
//    public AjaxResult getInfo(@PathVariable("mydonationsId") Long mydonationsId)
//    {
//        return success(appUserDonationsService.selectAppUserDonationsByMydonationsId(mydonationsId));
//    }
//
//    /**
//     * 新增我的捐献记录
//     */
//    @Log(title = "我的捐献记录", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody AppUserDonations appUserDonations)
//    {
//        return toAjax(appUserDonationsService.insertAppUserDonations(appUserDonations));
//    }
//
//    /**
//     * 修改我的捐献记录
//     */
//    @Log(title = "我的捐献记录", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody AppUserDonations appUserDonations)
//    {
//        return toAjax(appUserDonationsService.updateAppUserDonations(appUserDonations));
//    }
//
//    /**
//     * 删除我的捐献记录
//     */
//    @Log(title = "我的捐献记录", businessType = BusinessType.DELETE)
//	@DeleteMapping("/my_donations/{mydonationsIds}")
//    public AjaxResult remove(@PathVariable Long[] mydonationsIds)
//    {
//        return toAjax(appUserDonationsService.deleteAppUserDonationsByMydonationsIds(mydonationsIds));
//    }
}
